package org.imlinker.status;

import javax.swing.ImageIcon;

import org.jivesoftware.smack.packet.Presence;

/**
 * 保存用户状态的一个数据结构.
 * 
 * 有Presence，用于XMPP协议交流状态的对象 有Icon，用于显示用户的状态 有stauts，状态签名
 */
public class StatusPresence {

	public StatusPresence(final ImageIcon paraIcon, final String paraStatus) {
		this.icon = paraIcon;
		this.status = paraStatus;

		Presence.Type type = Presence.Type.available;
		Presence.Mode mode = Presence.Mode.valueOf(paraIcon.getDescription());
		presence = new Presence(type, paraStatus, 24, mode);
	}

	public ImageIcon getIcon() {
		return icon;
	}

	public Presence getPresence() {
		return presence;
	}

	public String getStatus() {
		return status;
	}

	private Presence presence;

	private ImageIcon icon;

	private String status;

}
